Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing a View's Attribute Set

QuickDraw 3D provides routines that you can use to manage a view's attribute set.

Q3View_GetDefaultAttributeSet

You can use the Q3View_GetDefaultAttributeSet function to get the default attribute set associated with a view.

TQ3Status Q3View_GetDefaultAttributeSet (
                     TQ3ViewObject view,
                     TQ3AttributeSet *attributeSet);
view
A view.
attributeSet
On exit, the default attribute set associated with the specified view.

DESCRIPTION

The Q3View_GetDefaultAttributeSet function returns, in the attributeSet parameter, the default attribute set of the view specified by the view parameter. QuickDraw 3D supplies a default set of attributes for every view so that you can safely render a view without having to set a value for each attribute. The default attribute values are defined by constants:

#define kQ3ViewDefaultAmbientCoefficient1.0
#define kQ3ViewDefaultDiffuseColor      0.5, 0.5, 0.5
#define kQ3ViewDefaultSpecularColor     0.5, 0.5, 0.5
#define kQ3ViewDefaultSpecularControl   4.0
#define kQ3ViewDefaultTransparency      1.0, 1.0, 1.0
#define kQ3ViewDefaultHighlightColor    1.0, 0.0, 0.0
#define kQ3ViewDefaultSubdivisionMethod kQ3SubdivisionMethodScreenSpace
#define kQ3ViewDefaultSubdivisionC1     20.0
#define kQ3ViewDefaultSubdivisionC2     20.0

Q3View_SetDefaultAttributeSet

You can use the Q3View_SetDefaultAttributeSet function to set the default attribute set associated with a view.

TQ3Status Q3View_SetDefaultAttributeSet (
                     TQ3ViewObject view,
                     TQ3AttributeSet attributeSet);
view
A view.
attributeSet
The default attribute set to be associated with the specified view.

DESCRIPTION

The Q3View_SetDefaultAttributeSet function sets the default attribute set of the view specified by the view parameter to the set specified in the attributeSet parameter.

Q3View_GetAttributeSetState

You can use the Q3View_GetAttributeSetState function to get the current attribute set associated with a view.

TQ3Status Q3View_GetAttributeSetState (
                     TQ3ViewObject view,
                     TQ3AttributeSet *attributeSet);
view
A view.
attributeSet
On exit, the attribute set currently associated with the specified view.

DESCRIPTION

The Q3View_GetAttributeSetState function returns, in the attributeSet parameter, the current attribute set of the view specified by the view parameter.

Q3View_GetAttributeState

You can use the Q3View_GetAttributeState function to get the state of a view's attribute.

TQ3Status Q3View_GetAttributeState (
                     TQ3ViewObject view,
                     TQ3AttributeType attributeType,
                     void *data);
view
A view.
attributeType
An attribute type.
data
On exit, a pointer to the attribute data associated with the specified attribute type.

DESCRIPTION

The Q3View_GetAttributeState function returns, in the data parameter, a pointer to the attribute data associated with the attribute type specified by the attributeType parameter in the attribute set of the view specified by the view parameter. If the value NULL is returned in the data parameter, there is no attribute of the specified type in the view's attribute set.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |